package kr.co.valueworks.fishing.activity;

import kr.co.valueworks.fishing.R;
import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;
import android.widget.TabHost;

public class MainTab extends TabActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        //setContentView(R.layout.main);
        
        final TabHost tabHost = getTabHost();
        Resources res = getResources(); 
        tabHost.addTab(tabHost.newTabSpec("tab1")
                .setIndicator(res.getText(R.string.main_search_fishing),res.getDrawable(R.drawable.zoom_icon_24))
                .setContent(new Intent(this, AreaActivity.class)));

        tabHost.addTab(tabHost.newTabSpec("tab2")
                .setIndicator(res.getText(R.string.main_my_fishing),res.getDrawable(R.drawable.push_pin_icon_24))
                .setContent(new Intent(this, MyFishingMap.class)));

		Intent intent = new Intent(this, Fishing.class);
		intent.putExtra("type", "favorite");
		
        tabHost.addTab(tabHost.newTabSpec("tab3")
                .setIndicator(res.getText(R.string.main_my_favorite),res.getDrawable(R.drawable.link_icon_24))
                .setContent(intent));        
    } 
    
}
